<template>
    <div class="app-container">
        <el-button type="success" @click="save">点击申请</el-button>
        <!-- 表格 -->
        <el-table
        :data="list"
        border
        fit
        highlight-current-row>

            <el-table-column
                label="序号"
                width="70"
                align="center">
                <template slot-scope="scope">
                {{ scope.$index + 1 }}
                </template>
            </el-table-column>


            <el-table-column prop='title' label="资产名称" width="80">
            </el-table-column>

            <el-table-column prop="des" label="资产描述" />

            <el-table-column prop="useMethod" label="资产用途" />
        </el-table>
    </div>
</template>
<script>
//引入 js 文件
import asset from '@/api/asset'
export default {
   // data:{

   // data的两种写法，均可
    data(){return{
            page:1,
            list:null//查询之后接口返回集合
        }
    },
    created(){this.getList()
    },
    methods:{getList(){ asset.getAssetApplyListPage()
            .then(response => {
               console.log(response)
                this.list = response.data.data.items
                console.log(this.list)
            }).catch(error => {
                console.log(error)
            })},
        save(){
            this.$router.push({path:'/asset_apply/save'})
        }
    }
}
</script>
